package com.yitiao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_article")
public class Article {
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 父级分类
     */
    @TableField(value = "category_id")
    private Long categoryId;

    /**
     * 根目录分类
     */
    @TableField(value = "root_id")
    private Long rootId;

    /**
     * 封面图片url
     */
    @TableField(value = "cover")
    private String cover;

    /**
     * 文档数
     */
    @TableField(value = "doc_count")
    private Integer docCount;

    /**
     * 阅读数
     */
    @TableField(value = "view_count")
    private Integer viewCount;

    /**
     * 点赞数
     */
    @TableField(value = "like_count")
    private Integer likeCount;

    /**
     * 标签
     */
    @TableField(value = "`label`")
    private String label;

    @TableField(value = "`description`")
    private String description;
}